package ch.reevolt.android.simulation;

import android.graphics.Rect;


/**
 * Interface for objects that can collide
 * with other objects.
 * 
 * @author Pierre-Andre Mudry
 * @date 2010
 * @version 1.0
 */
public interface Collisionnable {
	/**
	 * Callback used to notify the object that he was removed form the simulation
	 */
	void removedFromSim();

	/**
	 * When the {@link PhysicalObject} that implements this
	 * interfaces collides another object, this callback method
	 * is called
	 * 
	 * @param energy
	 *            Energy of the collision
	 * @return true if the object has to be destroyed
	 */
	public boolean notifyCollision(int energy, Object other);

	/**
	 * Gives the bounding box of the object which is used for detecting
	 * collisions.
	 * 
	 * @return the bounding box
	 */
	public Rect getBoundingBox();
}
